package com.xyh.dao;

import com.xyh.entity.Person;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import java.util.List;

public class PersonDaoImpl implements PersonDaoCustom {
    @PersistenceContext
    private EntityManager em;
    public List<Person> myQuery() {
        String sql="from Person";
       Query query =  em.createQuery(sql);
        return query.getResultList();
    }
}
